const express = require('express');
const router = express.Router();
const { auth, adminAuth } = require('../middleware/auth');
const {
  getComments,
  createComment,
  updateCommentStatus,
  deleteComment
} = require('../controllers/commentController');

// 获取评论列表
router.get('/scam/:scamId', getComments);

// 创建评论
router.post('/scam/:scamId', auth, createComment);

// 更新评论状态（管理员）
router.put('/:id/status', adminAuth, updateCommentStatus);

// 删除评论
router.delete('/:id', auth, deleteComment);

module.exports = router; 